j3deditor.bin.util
Class Translator

java.lang.Object
  extended by j3deditor.bin.util.Translator

public class Translator
extends java.lang.Object

Tool for translating UI text to specified language. Uses document tree loaded from an XML file.

Author:
Risto Seene

Constructor Summary
Translator(java.lang.String language)
          Create an instance of Translator.
 
Method Summary
 java.lang.String translate(java.lang.Class cl, java.lang.String object)
          Returns translation of element which name is object and which is located inside cl class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Translator

public Translator(java.lang.String language)
Create an instance of Translator.

Parameters:
language - two letter language code in lower case
Method Detail

translate

public java.lang.String translate(java.lang.Class cl,
                                  java.lang.String object)
Returns translation of element which name is object and which is located inside cl class.

Parameters:
cl - the name of the class the object is defined in
object - the name of the object
Returns:
Returns an instance of String that contains translation